#line 382 "/home/travis/build/felix-lang/felix/src/packages/flx.fdoc"
  class FlxProfile
  {
    fun dflt_profile () =
    {
      fun / (x:string, y:string) => Filename::join (x,y);
      var HOME=
        let h = Env::getenv "HOME" in
          if h!="" then h
          elif PLAT_WIN32 then Env::getenv "USERPROFILE"
          else ""
          endif
      ;
      if HOME == "" do
          eprintln$ "HOME (or USERPROFILE on WIN32) environment variable is not set.  Please set HOME before building.";
        System::exit 1;
      done
  
  
      var FLX_HOME_DIR = Env::getenv("FLX_HOME_DIR",HOME/".felix");
      var FLX_CACHE_TOP = Env::getenv("FLX_CACHE_TOP",FLX_HOME_DIR/"cache");
      var FLX_PROFILE_DIR = Env::getenv("FLX_PROFILE_DIR",FLX_HOME_DIR/"config");
  
      var FLX_CACHE_DIR = Env::getenv("FLX_CACHE_DIR",FLX_CACHE_TOP / "binary");
      var FLX_OUTPUT_DIR = Env::getenv("FLX_OUTPUT_DIR",FLX_CACHE_TOP / "text");
      return
        (
         FLX_HOME_DIR=FLX_HOME_DIR,
         FLX_PROFILE_DIR=FLX_PROFILE_DIR,
         FLX_CACHE_DIR=FLX_CACHE_DIR,
         FLX_OUTPUT_DIR=FLX_OUTPUT_DIR
        )
      ;
    }
  
    typedef profile_type = typeof (#dflt_profile);
    instance Str[profile_type] {
      fun str(x:profile_type) =>
         "FLX_HOME_DIR="+x.FLX_HOME_DIR+"\n"+
         "FLX_PROFILE_DIR="+x.FLX_PROFILE_DIR+"\n"+
         "FLX_CACHE_DIR="+x.FLX_CACHE_DIR+"\n"+
         "FLX_OUTPUT_DIR="+x.FLX_OUTPUT_DIR+"\n"
      ;
    }
  }