src/Tools/Haskell/haskell.ML
changeset 69239 6cd985a78d6e
parent 69233 560263485988
child 69240 16ca270090b6
equal deleted inserted replaced
69238:d98cfb369cbd 69239:6cd985a78d6e
     8 sig
     8 sig
     9   val generate_file_cmd: (string * Position.T) * Input.source ->
     9   val generate_file_cmd: (string * Position.T) * Input.source ->
    10     Toplevel.transition -> Toplevel.transition
    10     Toplevel.transition -> Toplevel.transition
    11   val export_file_cmd: string * Input.source ->
    11   val export_file_cmd: string * Input.source ->
    12     Toplevel.transition -> Toplevel.transition
    12     Toplevel.transition -> Toplevel.transition
    13   val source_modules: Path.T list
    13   val sources: Path.T list
       
    14   val install_sources: Path.T -> unit
    14 end;
    15 end;
    15 
    16 
    16 structure Haskell: HASKELL =
    17 structure Haskell: HASKELL =
    17 struct
    18 struct
    18 
    19 
    41       val text = header ^ GHC.read_source ctxt source;
    42       val text = header ^ GHC.read_source ctxt source;
    42       val _ = Export.export thy name [text];
    43       val _ = Export.export thy name [text];
    43     in () end);
    44     in () end);
    44 
    45 
    45 
    46 
    46 (* source modules *)
    47 (* sources *)
    47 
    48 
    48 val source_modules =
    49 val sources =
    49  [\<^file>\<open>~~/src/Tools/Haskell/Library.hs\<close>,
    50  [\<^path>\<open>Library.hs\<close>,
    50   \<^file>\<open>~~/src/Tools/Haskell/Value.hs\<close>,
    51   \<^path>\<open>Value.hs\<close>,
    51   \<^file>\<open>~~/src/Tools/Haskell/Buffer.hs\<close>,
    52   \<^path>\<open>Buffer.hs\<close>,
    52   \<^file>\<open>~~/src/Tools/Haskell/Properties.hs\<close>,
    53   \<^path>\<open>Properties.hs\<close>,
    53   \<^file>\<open>~~/src/Tools/Haskell/Markup.hs\<close>,
    54   \<^path>\<open>Markup.hs\<close>,
    54   \<^file>\<open>~~/src/Tools/Haskell/XML.hs\<close>,
    55   \<^path>\<open>XML.hs\<close>,
    55   \<^file>\<open>~~/src/Tools/Haskell/YXML.hs\<close>];
    56   \<^path>\<open>YXML.hs\<close>];
       
    57 
       
    58 val master_dir = Resources.master_directory \<^theory>;
       
    59 
       
    60 fun install_sources dir =
       
    61   sources |> List.app (fn path => Isabelle_System.copy_file_base (master_dir, path) dir);
    56 
    62 
    57 end;
    63 end;