code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
answer = sum [1..100] ^ 2 - foldl (\x y -> y^2 + x) 0 [1..100]
| tamasgal/haskell_exercises | ProjectEuler/p006.hs | mit | 63 | 0 | 10 | 16 | 52 | 27 | 25 | 1 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
module DirectoryAPI.API
( directoryAPIProxy
, DirectoryAPI
) where
import Servant
import AuthAPI.API (AuthToken)
import Models (File, Node, NodeId)
type DirectoryAPI = "ls" :> -- List all files
AuthToken :>
G... | houli/distributed-file-system | dfs-shared/src/DirectoryAPI/API.hs | mit | 1,213 | 0 | 20 | 421 | 198 | 113 | 85 | 24 | 1 |
module BlocVoting.Tally.Resolution where
import qualified Data.ByteString as BS
data Resolution = Resolution {
rCategories :: Int
, rEndTimestamp :: Int
, rName :: BS.ByteString
, rUrl :: BS.ByteString
, rVotesFor :: Integer
, rVotesTotal :: Integer
, rResolved :: Bool
}
deriving (Show, Eq)
update... | XertroV/blocvoting | src/BlocVoting/Tally/Resolution.hs | mit | 565 | 0 | 9 | 104 | 157 | 91 | 66 | 14 | 1 |
{-# LANGUAGE CPP #-}
module Database.Orville.PostgreSQL.Plan.Explanation
( Explanation
, noExplanation
, explainStep
, explanationSteps
) where
newtype Explanation =
Explanation ([String] -> [String])
#if MIN_VERSION_base(4,11,0)
instance Semigroup Explanation where
(<>) = appendExplanation
#endif
inst... | flipstone/orville | orville-postgresql/src/Database/Orville/PostgreSQL/Plan/Explanation.hs | mit | 800 | 0 | 8 | 121 | 193 | 110 | 83 | 23 | 1 |
import Data.List (permutations, sort)
solve :: String
solve = (sort $ permutations "0123456789") !! 999999
main = putStrLn $ solve
| pshendry/project-euler-solutions | 0024/solution.hs | mit | 133 | 0 | 8 | 22 | 47 | 26 | 21 | 4 | 1 |
module Lesson08 where
-- Now let's have some real fun: a two player, online five card stud game,
-- with a full betting system. The betting system is actually the biggest
-- addition versus what we've done previously, so most of our attention
-- will be focused on that. Most of the other code will be very similar
-- t... | snoyberg/haskell-impatient-poker-players | src/Lesson08.hs | mit | 5,286 | 0 | 19 | 1,643 | 1,450 | 706 | 744 | 104 | 4 |
{- hpodder component
Copyright (C) 2006 John Goerzen <jgoerzen@complete.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
T... | jgoerzen/hpodder | FeedParser.hs | gpl-2.0 | 6,088 | 1 | 16 | 2,117 | 1,532 | 797 | 735 | 115 | 7 |
{- |
Module : $EmptyHeader$
Description : <optional short description entry>
Copyright : (c) <Authors or Affiliations>
License : GPLv2 or higher, see LICENSE.txt
Maintainer : <email>
Stability : unstable | experimental | provisional | stable | frozen
Portability : portable | non-portable (<reason>... | nevrenato/Hets_Fork | GMP/versioning/gmp-0.0.1/GMP/Main.hs | gpl-2.0 | 3,633 | 3 | 16 | 1,112 | 822 | 416 | 406 | 67 | 6 |
{-# LANGUAGE ScopedTypeVariables #-}
import Bench
import Bench.Triangulations
main = print (qVertexSolBench trs)
| DanielSchuessler/hstri | scratch6.hs | gpl-3.0 | 115 | 0 | 7 | 15 | 24 | 13 | 11 | 4 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Response.Export
(pdfResponse) where
import Happstack.Server
import qualified Data.ByteString.Lazy as BS
import Control.Monad.IO.Class (liftIO)
import qualified Data.ByteString.Base64.Lazy as BEnc
import ImageConversion
import TimetableImageCreator (renderTable)
import Sy... | pkukulak/courseography | hs/Response/Export.hs | gpl-3.0 | 1,487 | 0 | 12 | 284 | 380 | 192 | 188 | 36 | 1 |
module Hazel.StringWriter where
import Control.Monad.State
------------- StringState -------------
type StringState = State String (Maybe Bool)
eval :: StringState -> String
eval s = execState s ""
newLine :: StringState
append :: String -> StringState
apply :: (String -> String) -> StringState
newLine = app... | hazel-el/hazel | Hazel/StringWriter.hs | gpl-3.0 | 860 | 1 | 8 | 250 | 155 | 92 | 63 | 11 | 1 |
{-# LANGUAGE FlexibleContexts, CPP, JavaScriptFFI #-}
module Carnap.GHCJS.Action.TreeDeductionCheck (treeDeductionCheckAction) where
import Lib hiding (content)
import Data.Tree
import Data.Either
import Data.Map as M (lookup,Map, toList)
import Data.IORef (IORef, readIORef, newIORef, writeIORef)
import Data.Typeable ... | gleachkr/Carnap | Carnap-GHCJS/src/Carnap/GHCJS/Action/TreeDeductionCheck.hs | gpl-3.0 | 15,280 | 0 | 25 | 6,177 | 3,919 | 1,946 | 1,973 | -1 | -1 |
-- Move generator logic
module Kurt.GoEngine ( genMove
, simulatePlayout
, EngineState(..)
, newEngineState
, updateEngineState
, newUctTree
) where
import Control.Arrow ... | lefant/kurt | src/Kurt/GoEngine.hs | gpl-3.0 | 11,157 | 0 | 21 | 4,063 | 3,147 | 1,659 | 1,488 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-cloudwatch-logs/gen/Network/AWS/CloudWatchLogs/PutLogEvents.hs | mpl-2.0 | 5,362 | 0 | 10 | 1,135 | 687 | 412 | 275 | 76 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/Get.hs | mpl-2.0 | 5,179 | 0 | 17 | 1,145 | 704 | 411 | 293 | 106 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-storage/gen/Network/Google/Resource/Storage/Objects/Update.hs | mpl-2.0 | 8,463 | 0 | 24 | 2,060 | 1,290 | 738 | 552 | 177 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebProperties/Update.hs | mpl-2.0 | 4,070 | 0 | 16 | 926 | 466 | 278 | 188 | 78 | 1 |
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-incomplete-patterns #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE GeneralizedNewty... | pontarius/pontarius-service | source/PontariusService/Types.hs | agpl-3.0 | 6,475 | 0 | 14 | 1,907 | 1,507 | 798 | 709 | -1 | -1 |
-- | This module provides the data type and parser for a trait file
module Trait (
Trait(..)
, defaultTrait
, trait
) where
import Maker
import Modifier
import Scoped(Label)
data Trait = Trait {
trait_name :: Label
, agnatic :: Bool
, birth :: Double -- ^ Chance of being assigned on birth. Default 0
... | joelwilliamson/validator | Trait.hs | agpl-3.0 | 3,593 | 0 | 41 | 970 | 847 | 492 | 355 | -1 | -1 |
-- Copyright (C) 2016-2017 Red Hat, Inc.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- This libr... | dashea/bdcs | importer/BDCS/RPM/Sources.hs | lgpl-2.1 | 1,380 | 0 | 11 | 234 | 192 | 116 | 76 | 13 | 1 |
{-|
Module : Main-nowx
Description : Модуль с точкой входа для консольной версии приложения
License : LGPLv3
-}
module Main where
import Kernel
import PlayerConsole
import DrawingConsole
import Controller
import AIPlayer
-- | Точка входа для консольной версии программы
main :: IO ()
main = do
... | cmc-haskell-2015/checkers | src/Main-nowx.hs | lgpl-3.0 | 805 | 0 | 13 | 188 | 155 | 81 | 74 | 18 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Mdb.Status ( doStatus ) where
import Control.Monad ( when )
import Control.Monad.Catch (MonadMask)
import Control.Monad.IO.Class ( MonadIO, liftIO )
import Control.Monad.Logger ( logWarnN, logDebugN, logInfoN )
import Control... | waldheinz/mdb | src/lib/Mdb/Status.hs | apache-2.0 | 1,802 | 0 | 23 | 523 | 569 | 307 | 262 | 37 | 2 |
module Serf.Event where
import Serf.Member
import Control.Applicative
import Control.Monad.IO.Class
import System.Environment
import System.Exit
import System.IO
import Text.Parsec
type SerfError = String
data SerfEvent = MemberJoin Member
| MemberLeave Member
| Memb... | lstephen/box | src/main/ansible/roles/serf/files/Serf/Event.hs | apache-2.0 | 2,110 | 0 | 12 | 576 | 572 | 289 | 283 | 51 | 9 |
{-# LANGUAGE ExplicitForAll, Rank2Types #-}
-- | An implementation of Reagents (http://www.mpi-sws.org/~turon/reagents.pdf)
-- NOTE: currently this is just a very tiny core of the Reagent design. Needs
-- lots of work.
module Data.Concurrent.Internal.Reagent where
import Data.IORef
import Data.Atomics
import P... | rrnewton/concurrent-skiplist | src/Data/Concurrent/Internal/Reagent.hs | apache-2.0 | 1,287 | 0 | 13 | 297 | 420 | 216 | 204 | 27 | 3 |
{-# LANGUAGE TemplateHaskell #-}
-- Copyright (C) 2010-2012 John Millikin <john@john-millikin.com>
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/license... | jmillikin/haskell-dbus | tests/DBusTests/Signature.hs | apache-2.0 | 4,901 | 16 | 16 | 860 | 1,580 | 786 | 794 | 119 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE... | dorchard/camfort | src/Language/Fortran/Model/Types.hs | apache-2.0 | 9,913 | 0 | 20 | 2,416 | 1,791 | 939 | 852 | 114 | 1 |
{-# LANGUAGE TupleSections #-}
module Arbitrary.TestModule where
import Data.Integrated.TestModule
import Test.QuickCheck
import Data.ModulePath
import Control.Applicative
import Arbitrary.Properties
import Test.Util
import Filesystem.Path.CurrentOS
import Prelude hiding (FilePath)
import qualified Arbitrary.ModulePat... | jfeltz/tasty-integrate | tests/Arbitrary/TestModule.hs | bsd-2-clause | 1,129 | 0 | 12 | 186 | 314 | 165 | 149 | 28 | 1 |
{-# LANGUAGE TemplateHaskell, QuasiQuotes, OverloadedStrings #-}
module Handler.Root where
import Foundation
-- This is a handler function for the GET request method on the RootR
-- resource pattern. All of your resource patterns are defined in
-- config/routes
--
-- The majority of the code you will write in Yesod l... | periodic/Simple-Yesod-ToDo | Handler/Root.hs | bsd-2-clause | 625 | 0 | 12 | 123 | 63 | 34 | 29 | 9 | 1 |
{--
Copyright (c) 2014-2020, Clockwork Dev Studio
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions a... | clockworkdevstudio/Idlewild-Lang | Arguments.hs | bsd-2-clause | 5,916 | 0 | 22 | 1,368 | 1,000 | 518 | 482 | 92 | 3 |
module Convert.LRChirotope where
-- standard modules
import Data.List
import qualified Data.Map as Map
import Data.Maybe
import qualified Data.Set as Set
-- local modules
import Basics
import Calculus.FlipFlop
import Helpful.General
--import Debug.Trace
{--------------------------------------------------------------... | spatial-reasoning/zeno | src/Convert/LRChirotope.hs | bsd-2-clause | 1,839 | 0 | 26 | 767 | 422 | 224 | 198 | 38 | 4 |
{-# LANGUAGE FlexibleContexts #-}
module BRC.Solver.Error where
import Control.Monad.Error (Error(..), MonadError(..))
-- | Solver errors, really just a container for a possibly useful error message.
data SolverError = SolverError String deriving (Eq, Ord)
instance Show (SolverError) where
show (SolverError msg) ... | kcharter/brc-solver | BRC/Solver/Error.hs | bsd-2-clause | 565 | 0 | 8 | 95 | 124 | 71 | 53 | 10 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module NW.Monster where
import NW.Stats
data MonsterClass
= MCFighter
| MCMage
deriving (Eq, Show)
data Monster = Monster
{ mClass :: MonsterClass
, mName :: String
, mStatsBase :: [Stat]
, mLootBonus :: Int
} deriving (Eq, Show)
type Mons... | listx/netherworld | src/NW/Monster.hs | bsd-2-clause | 338 | 8 | 9 | 63 | 98 | 60 | 38 | 15 | 0 |
{-# LANGUAGE TemplateHaskell #-}
{-| Contains TemplateHaskell stuff I don't want to recompile every time I make
changes to other files, a pre-compiled header, so to say. Don't know if that
even works.
-}
module FeedGipeda.THGenerated
( benchmarkClosure
, stringDict
, __remoteTable
) where
import ... | sgraf812/feed-gipeda | src/FeedGipeda/THGenerated.hs | bsd-3-clause | 1,466 | 0 | 11 | 454 | 272 | 156 | 116 | 24 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TupleSections #-}
{-# OP... | zohl/postgresql-simple-bind | tests/Test/PGConstant.hs | bsd-3-clause | 1,133 | 0 | 12 | 177 | 253 | 149 | 104 | 36 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module WildBind.SeqSpec (main,spec) where
import Control.Applicative ((<*>))
import Control.Monad (forM_)
import Control.Monad.IO.Class (liftIO)
import qualified Control.Monad.Trans.State as State
import Data.Monoid ((<>))
import Data.IORef (modifyIORef, newIORef, readIORef)
import T... | debug-ito/wild-bind | wild-bind/test/WildBind/SeqSpec.hs | bsd-3-clause | 7,072 | 0 | 23 | 2,072 | 2,930 | 1,501 | 1,429 | 175 | 2 |
{-# LANGUAGE TemplateHaskell #-}
module Data.Comp.Trans.DeriveUntrans (
deriveUntrans
) where
import Control.Lens ( view ,(^.))
import Control.Monad ( liftM )
import Control.Monad.Trans ( lift )
import Data.Comp.Multi ( Alg, cata, (:&:)(..) )
import Language.Haskell.TH
import Data.Comp.Trans.Util
----------... | jkoppel/comptrans | Data/Comp/Trans/DeriveUntrans.hs | bsd-3-clause | 8,030 | 0 | 20 | 3,281 | 1,942 | 992 | 950 | 100 | 4 |
module Mistral.Schedule.Value (
Env
, groupEnv
, lookupEnv
, bindType
, bindValue
, bindParam
, NodeTags
, bindNode
, lookupTag, lookupTags
, Value(..)
, SNetwork(..), mapWhen, modifyNode
, SNode(..), addTask
, STask(..), hasConstraints
, SConstraint(..), target
) where
import Mistral... | GaloisInc/mistral | src/Mistral/Schedule/Value.hs | bsd-3-clause | 5,624 | 0 | 14 | 1,727 | 1,680 | 920 | 760 | 121 | 2 |
{-# LANGUAGE ParallelListComp #-}
module OldHMM
(Prob, HMM(..), train, bestSequence, sequenceProb)
where
import qualified Data.Map as M
import Data.List (sort, groupBy, maximumBy, foldl')
import Data.Maybe (fromMaybe, fromJust)
import Data.Ord (comparing)
import Data.Function (on)
import Control.Monad
import ... | mikeizbicki/hmm | OldHMM.hs | bsd-3-clause | 5,845 | 8 | 16 | 1,773 | 1,640 | 907 | 733 | 91 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
... | bitemyapp/hspec-snap | src/Test/Hspec/Snap.hs | bsd-3-clause | 22,986 | 0 | 22 | 7,031 | 5,474 | 2,827 | 2,647 | 387 | 8 |
{-# LANGUAGE TypeOperators, MultiParamTypeClasses, FunctionalDependencies
, UndecidableInstances
#-}
-- For ghc 6.6 compatibility
-- {-# OPTIONS -fglasgow-exts -fallow-undecidable-instances #-}
----------------------------------------------------------------------
-- |
-- Module : Data.FunArr
-- Cop... | conal/DeepArrow | src/Data/FunArr.hs | bsd-3-clause | 2,075 | 2 | 10 | 435 | 310 | 184 | 126 | 17 | 0 |
module Main where
import Build_doctests (flags, pkgs, module_sources)
import Data.Foldable (traverse_)
import Test.DocTest (doctest)
main :: IO ()
main = do
traverse_ putStrLn args
doctest args
where
args = ["-XOverloadedStrings"] ++ flags ++ pkgs ++ module_sources
| kazu-yamamoto/unix-time | test/doctests.hs | bsd-3-clause | 282 | 0 | 10 | 52 | 89 | 49 | 40 | 9 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Configure
-- Copyright : (c) David Himmelstrup 2005,
-- Duncan Coutts 2005
-- License : BSD-like
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
... | alphaHeavy/cabal | cabal-install/Distribution/Client/Configure.hs | bsd-3-clause | 8,529 | 0 | 20 | 2,277 | 1,429 | 793 | 636 | 144 | 5 |
module Text.OpenGL.Xml.ReadRegistry (
readRegistry,
parseRegistry,
PreProcess
) where
import Prelude hiding ((.), id)
import Control.Category
import Text.OpenGL.Types
import Text.OpenGL.Xml.Pickle()
import Text.OpenGL.Xml.PreProcess
import Text.XML.HXT.Core
type PreProcess = Bool
-- TODO RelaxNG valid... | Laar/opengl-xmlspec | src/Text/OpenGL/Xml/ReadRegistry.hs | bsd-3-clause | 1,468 | 0 | 12 | 298 | 395 | 213 | 182 | 34 | 3 |
{-# Language OverloadedStrings #-}
module XMonad.Actions.XHints.Render where
import XMonad hiding (drawString)
import Data.Text (Text)
import qualified Data.Text as T
import Foreign.C
import Graphics.X11.Xlib.Types
import qualified Data.Text.Foreign as TF
import qualified Data.ByteString as BS
import Codec.Binary.UTF8... | netogallo/XHints | src/XMonad/Actions/XHints/Render.hs | bsd-3-clause | 1,227 | 0 | 13 | 272 | 381 | 202 | 179 | 31 | 1 |
isPrime :: Integral a => a -> Bool
isPrime 2 = True
isPrime 3 = True
isPrime n =
all (\ x -> x /= 0)
[n `mod` x | x <- [2..(truncate $ sqrt (fromIntegral n) + 1)]]
goldbach :: (Integral t, Integral t1) => t1 -> (t, t1)
goldbach n = goldbach' 3 (n - 3)
where
goldbach' a b
| isPrime a &&... | m00nlight/99-problems | haskell/p-40.hs | bsd-3-clause | 403 | 0 | 15 | 138 | 212 | 109 | 103 | 11 | 1 |
module UI.Widget.List (
listWidget
) where
import Reactive.Banana
import Reactive.Banana.Extra
import Reactive.Banana.Frameworks
import UI.TclTk
import UI.TclTk.AST
import UI.TclTk.Builder
import UI.Widget
-- | List widget
listWidget :: Frameworks t => Event t [a] -> GUI t p (TkName, Event t (Int,a))
listWidg... | Shimuuar/banana-tcltk | UI/Widget/List.hs | bsd-3-clause | 2,401 | 0 | 17 | 830 | 963 | 478 | 485 | 66 | 10 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
module React.Flux.Mui.RadioButton.RadioButtonGroup where
import Protolude
import Data.Aeson
import Data.Aeson.Casing
import Data.String (String)
import React.Flux
import React.Flux.Mui.Types
import React.Flux.Mui.Util
data ... | pbogdan/react-flux-mui | react-flux-mui/src/React/Flux/Mui/RadioButton/RadioButtonGroup.hs | bsd-3-clause | 1,165 | 0 | 15 | 161 | 265 | 150 | 115 | 38 | 1 |
-- |
-- Module: Threshold
-- Description: Time integrated threshold functions
-- Copyright: (c) 2013 Tom Hawkins & Lee Pike
--
-- Time integrated threshold functions typically used in condition monitoring.
module Language.Atom.Common.Threshold
( boolThreshold
, doubleThreshold
) where
import Language.Atom.Expre... | Copilot-Language/atom_for_copilot | Language/Atom/Common/Threshold.hs | bsd-3-clause | 1,806 | 0 | 16 | 428 | 505 | 241 | 264 | 35 | 2 |
import Control.Monad (when)
import Distribution.Simple
import System.Directory (doesFileExist)
import System.Process (readProcess)
import Data.ByteString.Char8 as BS
gitVersion :: IO ()
gitVersion = do
let filename = "app/Internal/Version.hs"
... | da-x/fancydiff | Setup.hs | bsd-3-clause | 780 | 0 | 16 | 260 | 207 | 103 | 104 | 20 | 2 |
module Vector where
data Vec = V !Int !Int deriving (Show, Eq)
instance Num Vec where
V x1 y1 + V x2 y2 = V (x1+x2) (y1+y2)
V x1 y1 - V x2 y2 = V (x1-x2) (y1-y2)
V x1 y1 * V x2 y2 = V (x1*x2) (y1*y2)
abs (V x y) = V (abs x) (abs y)
signum (V x y) = V (signum x) (signum y)
fromInteger x = V (fromInteger x)... | cobbpg/dow | src/Vector.hs | bsd-3-clause | 337 | 0 | 8 | 91 | 247 | 120 | 127 | 13 | 0 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoImplicitPrelude #-}
module Ircbrowse.View.Template where
import Ircbrowse.View
import Ircbrowse.Types.Import
import qualified Text.Blaze.Html5 as H
import Data.Text (Text)
template :: AttributeValue -> Text -> Html -> Html -> Html
te... | chrisdone/ircbrowse | src/Ircbrowse/View/Template.hs | bsd-3-clause | 3,220 | 0 | 21 | 986 | 651 | 318 | 333 | 54 | 1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.Compatibility31
-- Copyright : (c) Sven Panne 2015
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portable
--
... | phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Compatibility31.hs | bsd-3-clause | 38,287 | 0 | 4 | 5,537 | 5,503 | 3,676 | 1,827 | 1,822 | 0 |
module Scheme.DataType (
module Scheme.DataType.Misc,
EvalError, ScmError, TryError,
Expr(..),
ScmCode(..), ScmFile,
Var(..),
Return(..), ReturnE,
Name, AFunc, WAFunc, RFunc, Proc, Synt,
Scm, runScm,
ScmEnv, ScmStates, ScmRef,
MetaInfo(..), Config(..), setConfig, setMSP,
... | ocean0yohsuke/Scheme | src/Scheme/DataType.hs | bsd-3-clause | 9,162 | 0 | 14 | 2,716 | 2,883 | 1,548 | 1,335 | 202 | 1 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, TypeFamilies #-}
module Rubik.Turn where
import Data.Array
import Rubik.Negate as N
import Rubik.Key
data Turn = NoTurn | Clock | OneEighty | CounterClock
deriving (Eq,Ord,Show,Enum,Ix)
instance Negate Turn where
negate NoTurn = NoTurn
n... | andygill/rubik-solver | src/Rubik/Turn.hs | bsd-3-clause | 1,481 | 0 | 8 | 377 | 161 | 92 | 69 | 17 | 0 |
{-# LANGUAGE FlexibleInstances #-}
-- ghc options
{-# OPTIONS_GHC -Wall #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- {-# OPTIONS_GHC -fno-warn-name-shadowing #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-- {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
-- {-# OPTIONS_GHC -fno-warn-unused-do-bind #-}
-- {... | reuleaux/pire | src/Pire/Pretty/Nm.hs | bsd-3-clause | 1,331 | 0 | 9 | 286 | 231 | 127 | 104 | 21 | 0 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-- | Converting 'MC' programs to 'MCMem'.
module Futhark.Pass.ExplicitAllocations.MC (explicitAllocations) where
import Futhark.IR.MC
import Futhark.IR.MCMem
import Futhark.Pass.Exp... | HIPERFIT/futhark | src/Futhark/Pass/ExplicitAllocations/MC.hs | isc | 1,283 | 0 | 11 | 239 | 303 | 159 | 144 | 29 | 1 |
class X where
foo :: Int
-- | Y
-- Y is something
-- nice.
class Y where
bar :: Int
| itchyny/vim-haskell-indent | test/comment/before_blank_line_and_class.out.hs | mit | 91 | 0 | 6 | 28 | 28 | 15 | 13 | -1 | -1 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE Arrows #-}
module Main where
import Opaleye
import Data.Profunctor.Product
import Data.Profunctor.Product.Default
import Data.Profunctor... | meditans/haskell-webapps | doc/docs/opaleye/code/opaleye-select-with-records-and-restrict.hs | mit | 1,804 | 1 | 15 | 341 | 455 | 251 | 204 | 41 | 1 |
-- TESTS (1-17 non-calendar time)
{-
NTest[(* 5 *)
b = N[DiscountFactor[1, 9 + 28/100, Compounding -> {Linear, 1}, CompiledDF -> True], 50]
,
0.9150805270863837
]
## HQL
discountFactor (InterestRate (Periodic 1) (9+28/100 :: Double)) 1.00 0.0 == 0.9150805270863837
-}
{-
NTest[(* 7 *)
DiscountFactor[1.5, termstructur... | andreasbock/hql | testsuite/DiscountingTest.hs | gpl-2.0 | 3,753 | 0 | 2 | 575 | 25 | 24 | 1 | 1 | 0 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
module CO4.Example.Fib
where
import Language.Haskell.TH (runIO)
import qualified Satchmo.Core.SAT.Minisat
import qualified Satchmo... | apunktbau/co4 | test/CO4/Example/Fib.hs | gpl-3.0 | 1,177 | 0 | 9 | 448 | 176 | 101 | 75 | 37 | 1 |
main = f `x y` g
| roberth/uu-helium | test/parser/BackQuoteMessage.hs | gpl-3.0 | 17 | 1 | 5 | 6 | 13 | 8 | 5 | -1 | -1 |
module Verifier.SAW.SATQuery
( SATQuery(..)
, SATResult(..)
, satQueryAsTerm
) where
import Control.Monad (foldM)
import Data.Map (Map)
import Data.Set (Set)
import Verifier.SAW.Name
import Verifier.SAW.FiniteValue
import Verifier.SAW.SharedTerm
-- | This datatype represents a satisfiability query that might
-- be... | GaloisInc/saw-script | saw-core/src/Verifier/SAW/SATQuery.hs | bsd-3-clause | 2,474 | 0 | 11 | 550 | 253 | 158 | 95 | 24 | 2 |
{-# LANGUAGE OverloadedStrings, TupleSections #-}
-- | Parser components for the ROS message description language (@msg@
-- files). See http://wiki.ros.org/msg for reference.
module Parse (parseMsg, parseSrv, simpleFieldAssoc) where
import Prelude hiding (takeWhile)
import Control.Applicative
import Control.Arrow ((&&&... | bitemyapp/roshask | src/executable/Parse.hs | bsd-3-clause | 7,585 | 0 | 13 | 1,728 | 2,148 | 1,166 | 982 | -1 | -1 |
module FunIn3 where
--The application of a function is replaced by the right-hand side of the definition,
--with actual parameters replacing formals.
--In this example, unfold 'addthree'.
--This example aims to test the elimination of extra parentheses when unfolding
--a function defintion.
main :: Int -> Int
main =... | mpickering/HaRe | old/testing/unfoldDef/FunIn3_TokOut.hs | bsd-3-clause | 469 | 0 | 12 | 122 | 102 | 57 | 45 | 7 | 2 |
module StrategoAST2(module AST) where
import StrategoPattern as AST
import StrategoTerm as AST
import StrategoType as AST
import StrategoProp as AST
import StrategoDecl as AST
| forste/haReFork | tools/hs2stratego/AST/StrategoAST2.hs | bsd-3-clause | 176 | 0 | 4 | 24 | 35 | 27 | 8 | 6 | 0 |
module ShowRepoEvents where
import qualified Github.Issues.Events as Github
import Data.List (intercalate)
import Data.Maybe (fromJust)
main = do
possibleEvents <- Github.eventsForRepo "thoughtbot" "paperclip"
case possibleEvents of
(Left error) -> putStrLn $ "Error: " ++ show error
(Right events) -... | bitemyapp/github | samples/Issues/Events/ShowRepoEvents.hs | bsd-3-clause | 1,783 | 0 | 14 | 352 | 487 | 241 | 246 | 36 | 8 |
--
-- Copyright (c) 2011 Citrix Systems, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This progra... | jean-edouard/manager | xenmgr/Setup.hs | gpl-2.0 | 8,034 | 0 | 22 | 1,919 | 1,714 | 964 | 750 | 122 | 6 |
module Lib where
import Data.Function (on)
import Data.List (findIndices, minimumBy, transpose)
import Data.Maybe (isJust, isNothing)
data Shape = Nought | Cross
deriving (Read, Show, Eq)
type Cell = Maybe Shape
type Board = [Cell]
boardSize = 3
emptyBoard = replicate (boardSize * boardSize) Nothing
makeBoard :... | leocassarani/noughts-and-crosses | src/Lib.hs | mit | 2,262 | 0 | 12 | 515 | 922 | 478 | 444 | 58 | 3 |
{-|
Module : TestUtils.Validate
Description : The Validate type class
Copyright : (c) Andrew Burnett 2014-2015
Maintainer : andyburnett88@gmail.com
Stability : experimental
Portability : Unknown
'Validate' provides a definition for validating a data structure. For example,
we may cache information about the ... | aburnett88/HSat | tests-src/TestUtils/Validate.hs | mit | 712 | 0 | 7 | 133 | 37 | 23 | 14 | 4 | 0 |
module Language.Aspell (
-- * Constructors
SpellChecker,
spellChecker,
spellCheckerWithOptions,
spellCheckerWithDictionary,
-- * Using the spell checker
check,
suggest
) where
import Data.ByteString.Char8
import Foreign
#if !MIN_VERSION_base(4,7,0)
hiding (unsafePerformIO)
#endif
... | pikajude/haspell | Language/Aspell.hs | mit | 9,412 | 0 | 14 | 2,466 | 2,523 | 1,242 | 1,281 | -1 | -1 |
{- |
module: Main
description: Testing the FEN to Unicode conversion
license: MIT
maintainer: Joe Leslie-Hurd <joe@gilith.com>
stability: provisional
portability: portable
-}
module Main
( main )
where
import qualified Unicode
import qualified Chess
tests :: [(String,String,Chess.Edge)]
tests =
[("Initial posi... | gilith/opentheory | data/haskell/fen2s/src/Test.hs | mit | 765 | 0 | 11 | 150 | 183 | 106 | 77 | 21 | 1 |
{-# LANGUAGE TupleSections #-}
module Y2016.M09.D09.Solution where
import Control.Arrow (first)
import Control.Monad (guard, (>=>))
import Data.Function (on)
import Data.List (sortBy)
import Data.Map (Map)
import qualified Data.Map as Map
-- below import available from 1HaskellADay git repository
import Control.Lis... | geophf/1HaskellADay | exercises/HAD/Y2016/M09/D09/Solution.hs | mit | 3,206 | 0 | 18 | 614 | 876 | 489 | 387 | -1 | -1 |
{-# htermination (scanl :: (a -> b -> a) -> a -> (List b) -> (List a)) #-}
import qualified Prelude
data MyBool = MyTrue | MyFalse
data List a = Cons a (List a) | Nil
scanl0 f q Nil = Nil;
scanl0 f q (Cons x xs) = scanl f (f q x) xs;
scanl :: (b -> a -> b) -> b -> (List a) -> (List b);
scanl f ... | ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/scanl_1.hs | mit | 352 | 0 | 9 | 108 | 155 | 83 | 72 | 7 | 1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
-- | The GhostLang.Node.Flow module is implementing the Flows -
-- business logic - for the Node.
module GhostLang.Node.Flow
( getHttpConfig
, setHttpConfig
, listPrograms
, listPatternsFromProgram
, runNamedPattern
, runRando... | kosmoskatten/ghost-lang | ghost-node/src/GhostLang/Node/Flow.hs | mit | 8,813 | 0 | 20 | 3,122 | 1,816 | 977 | 839 | 165 | 3 |
{-# LANGUAGE CPP #-}
module GHCJS.DOM.DataTransfer (
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
module GHCJS.DOM.JSFFI.Generated.DataTransfer
#else
#endif
) where
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
import GHCJS.DOM.JSFFI.Generat... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/DataTransfer.hs | mit | 349 | 0 | 5 | 33 | 33 | 26 | 7 | 4 | 0 |
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Hadoop.Protos.YarnProtos.AMCommandProto (AMCommandProto(..)) where
import Prelude ((+), (/), (.))
import qualified Prelude as Prelude'
import qualified Data.Typeable... | alexbiehl/hoop | hadoop-protos/src/Hadoop/Protos/YarnProtos/AMCommandProto.hs | mit | 2,466 | 0 | 11 | 377 | 601 | 327 | 274 | 50 | 1 |
-- module Day04 (solveDay04) where
module Day04 where
import Control.Monad (mapM_)
import Data.Char (chr, isDigit, ord)
import Data.Function (on)
import Data.List (group, nub, sort, sortBy)
import Data.List.Split (splitOn, wordsBy)
isSquareBracket :: C... | justanotherdot/advent-linguist | 2016/Haskell/AdventOfCode/src/Day04.hs | mit | 1,928 | 0 | 14 | 502 | 774 | 412 | 362 | 43 | 2 |
{-# htermination minFM :: (Ord a, Ord k) => FiniteMap (Either a k) b -> Maybe (Either a k) #-}
import FiniteMap
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/FiniteMap_minFM_10.hs | mit | 112 | 0 | 3 | 22 | 5 | 3 | 2 | 1 | 0 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Stackage.BuildPlan
( readBuildPlan
, writeBuildPlan
) where
import qualified Data.Map as Map
import qualified Data.Set as Set
import Distribution.Text (display, sim... | yogsototh/stackage | Stackage/BuildPlan.hs | mit | 5,250 | 0 | 16 | 1,670 | 1,656 | 852 | 804 | 132 | 4 |
module Puppet.Master.Interpreter ( InterpreterWorker
, newInterpreterWorker
, ask
, eval
, typeOf
) where
import Exception
import Control.Monad
import GH... | jd823592/puppeteer | src/Puppet/Master/Interpreter.hs | mit | 1,473 | 0 | 11 | 480 | 421 | 221 | 200 | -1 | -1 |
{-# LANGUAGE Haskell2010
, MagicHash
, FlexibleInstances
, FlexibleContexts
, MultiParamTypeClasses
, FunctionalDependencies
#-}
{-# OPTIONS
-Wall
-fno-warn-missing-signatures
-fno-warn-name-shadowing
#-}
-- | This module contains mostly boiler plate code that is needed
-- for method ... | fehu/haskell-java-bridge-fork | src/Foreign/Java/Types.hs | mit | 9,256 | 0 | 11 | 2,093 | 3,056 | 1,606 | 1,450 | 210 | 1 |
module Feature.DeleteSpec where
import Test.Hspec
import Test.Hspec.Wai
import Text.Heredoc
import SpecHelper
import PostgREST.Types (DbStructure(..))
import qualified Hasql.Connection as H
import Network.HTTP.Types
spec :: DbStructure -> H.Connection -> Spec
spec struct c = beforeAll resetDb
. around (withApp c... | motiz88/postgrest | test/Feature/DeleteSpec.hs | mit | 1,312 | 0 | 18 | 351 | 315 | 168 | 147 | -1 | -1 |
module Data.HashId
(
-- * Core types
HashId
, HashEncoder
, HashOptions
, Salt
-- * Core functions
, defaultOptions
, mkEncoder
, encode
, decode
, parse
, toText
, salt
) where
import Data.HashId.Inte... | muhbaasu/hash-id | src/Data/HashId.hs | mit | 325 | 0 | 4 | 155 | 49 | 33 | 16 | 14 | 0 |
#!runghc
import Data.List
main = interact (unlines.map unwords.groupBy f.words.filter (/='\0')) where
f "0xff" _ = False
f _ _ = True
| ducis/multitouch-visualizer | linebreaker.hs | gpl-2.0 | 136 | 0 | 9 | 23 | 59 | 31 | 28 | 4 | 2 |
module Paths_Haskell_Project (
version,
getBinDir, getLibDir, getDataDir, getLibexecDir,
getDataFileName, getSysconfDir
) where
import qualified Control.Exception as Exception
import Data.Version (Version(..))
import System.Environment (getEnv)
import Prelude
catchIO :: IO a -> (Exception.IOException ->... | MaximusDesign/Haskell_Project | dist/build/autogen/Paths_Haskell_Project.hs | gpl-2.0 | 1,535 | 0 | 10 | 177 | 362 | 206 | 156 | 28 | 1 |
module FizzBuzz where
import Control.Monad (mapM_)
fizzbuzz :: (Show a, Integral a) => a -> String
fizzbuzz n = if null s then (show n) else s
where
s = (if (n `mod` 3) == 0 then "Fizz" else "") ++ (if (n `mod` 5) == 0 then "Buzz" else "")
main :: IO ()
main = mapM_ putStrLn $ map fizzbuzz [1..100]
| AaronRobson/FizzBuzzHaskell | FizzBuzz.hs | gpl-3.0 | 309 | 0 | 12 | 72 | 154 | 87 | 67 | 7 | 4 |
module Util where
import Data.Acid (Update)
import Data.Aeson.Encode.Pretty
import Data.IxSet (empty)
import Data.Text (pack, unpack, Text)
import Data.Text.IO (hPutStr)
import qualified Data.Text.IO as TIO
import Happstack.Server (toResponse, Response)
import System.Directory (removeFile)
import System.IO (hClose)
... | ibabushkin/morgue-server | src/Util.hs | gpl-3.0 | 2,663 | 0 | 13 | 689 | 778 | 414 | 364 | 52 | 2 |
module StandOff.DomTypeDefs where
import StandOff.LineOffsets
import qualified StandOff.TextRange as TR
import StandOff.MarkupTree
type AttrName = String
type AttrVal = String
data Attribute = Attribute (AttrName, AttrVal) deriving (Show)
data XML = Element { name :: String
, attributes :: [A... | lueck/standoff-tools | src/StandOff/DomTypeDefs.hs | gpl-3.0 | 3,790 | 0 | 9 | 1,115 | 1,186 | 658 | 528 | 78 | 1 |
{-# LANGUAGE Rank2Types, GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Helium.Syntax.UHA_Pretty where
-- Below two imports are to avoid clashes of "list" as used by the AG system.
-- Effectively, only list from the imported library needs to be qualified.
import Prelude hiding ((<$>))
import Text.PrettyPrint.L... | roberth/uu-helium | src/Helium/Syntax/UHA_Pretty.hs | gpl-3.0 | 287,970 | 56 | 23 | 73,081 | 57,815 | 31,346 | 26,469 | 5,094 | 6 |
{-# OPTIONS -O0 #-}
{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, TypeFamilies #-}
-- | The themes/ config format
module Lamdu.Config.Theme
( Help(..)
, helpTextSize, helpTextColor, helpInputDocColor, helpBGColor, helpTint
, helpShownIconTint, helpSrcLocColor
, Eval(..), neighborsScaleFa... | lamdu/lamdu | src/Lamdu/Config/Theme.hs | gpl-3.0 | 6,252 | 0 | 15 | 1,257 | 1,464 | 885 | 579 | 154 | 1 |
module Robotics.Thingomatic.Config where
data PrinterConfig = Config { extSpeed::Double,
extTemp::Int,
platTemp::Int,
layer::Double
} deriving(Show,Read,Eq)
... | matthewSorensen/weft | Robotics/Thingomatic/Config.hs | gpl-3.0 | 434 | 0 | 8 | 220 | 86 | 54 | 32 | 7 | 1 |
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DeriveDataTypeable #-}
{- |
Module : Tct.Method.Bounds
Copyright : (c) Martin Avanzini... | mzini/TcT | source/Tct/Method/Bounds.hs | gpl-3.0 | 8,030 | 0 | 20 | 2,363 | 1,793 | 978 | 815 | 115 | 2 |
{-# LANGUAGE GADTs #-}
-- | Simple embedded DSL using GADT's.
--
-- Example adapted from:
--
-- https://en.wikibooks.org/wiki/Haskell/GADT
module ExprDSLGADTs where
data Expr a where
I :: Int -> Expr Int
B :: Bool -> Expr Bool
Add :: Expr Int -> Expr Int -> Expr Int
Eq :: (Eq a) => Expr a -> Expr a -> Expr ... | capitanbatata/apath-slfp | competent/gadts/src/ExprDSLGADTs.hs | gpl-3.0 | 1,592 | 0 | 8 | 389 | 315 | 173 | 142 | 18 | 1 |
{-|
Module : Main
Copyright : (c) Chris Tetreault, 2014
License : GPL-3
Stability : experimental
The Main module implements the main function; the entry point to the program.
-}
module Main where
import DMP.Photobooth
import DMP.Photobooth.Monads
import DMP.Photobooth.Core
import System.Exit
{-|
The main function ... | christetreault/dmp-photo-booth-prime | Main.hs | gpl-3.0 | 746 | 0 | 10 | 185 | 84 | 45 | 39 | 17 | 2 |
{-# LANGUAGE Arrows, NoMonomorphismRestriction #-}
--
-- Same transformation as the Yesod XML example: http://www.yesodweb.com/book/xml
-- Using XHT to see how it compares to xml-coduit.
--
module YesodExample (process) where
import Text.XML.HXT.Core
process :: ArrowXml a => a XmlTree XmlTree
process = de... | c0c0n3/hAppYard | hxml/hxt-vs-xml-conduit/hxt/YesodExample.hs | gpl-3.0 | 1,527 | 0 | 10 | 430 | 337 | 180 | 157 | 24 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
-- |
-- Module : Main
-- Copyright : (c) 2013 Brendan Hay <brendan.g.hay@gmail.com>
-- License : This Source Code Form is subject to the terms of
-- ... | brendanhay/czar | czar-graphite/Main.hs | mpl-2.0 | 3,811 | 0 | 16 | 1,201 | 797 | 417 | 380 | 80 | 3 |
import Data.List
import System.Random
import System.IO
import Neural
main = do
g <- getStdGen
csv <- openFile "learning.dat" WriteMode
let un = randomNNet g [2,16,1]
let
uloop n = do
let r = concatMap (feedforward n) [[0,0],[1,1],[1,0],[0,1]]
hPutStrLn csv $ intercalate " " $ map show r
case ... | quickdudley/varroa | test.hs | agpl-3.0 | 609 | 0 | 22 | 167 | 348 | 184 | 164 | 19 | 2 |
{-
- This file is part of Bilder.
-
- Bilder is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- Bilder i... | ingemaradahl/bilder | src/TypeChecker/Inferring.hs | lgpl-3.0 | 8,353 | 0 | 15 | 1,715 | 3,108 | 1,484 | 1,624 | 185 | 10 |
{-# LANGUAGE QuasiQuotes, TemplateHaskell #-}
{-# OPTIONS_GHC -Wall #-}
-- http://www.well-typed.com/blog/2014/10/quasi-quoting-dsls/
import QQAst
import Language.Haskell.TH.Syntax
prog1 :: Prog
prog1 = [prog|
var x ;
x := read ;
write (x + x + 1)
|]
prog2 :: VarName -> Integer -> Prog
prog2 y n = [p... | egaburov/funstuff | Haskell/thsk/qqast.hs | apache-2.0 | 707 | 0 | 8 | 175 | 209 | 115 | 94 | 19 | 1 |
-- Copyright 2015 Peter Harpending
--
-- Licensed under the Apache License, Version 2.0 (the "License"); you
-- may not use this file except in compliance with the License. You
-- may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agre... | pharpend/editor-open | tests/test_yaml_file.hs | apache-2.0 | 1,128 | 0 | 7 | 227 | 81 | 55 | 26 | 10 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.